﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace NewRen.Models.ViewModel
{
    public class vIndustryBusiness
    {
        public int ID { set; get; }

        public string IndustryName { set; get; }

        public List<Business> Businesses { set; get; }

        public vIndustryBusiness() { }

        public vIndustryBusiness(Industry model)
        {
            DB db = new DB();
            this.ID = model.ID;
            this.IndustryName = model.IndustryName;
            this.Businesses = db.Businesses.Where(c => c.Industry == model.IndustryName).Take(6).ToList();
        }
    }
}